The present invention relates in general to computer technology, and in particular to a new and useful method and apparatus for utilizing a single memory chip with shadowed memory portions.
Shadowing is a method by which memory expansion can be accomplished without extending the address field.
Often, the directly addressable memory in a memory chip is sufficient to store the controller code for a program that is used to achieve a selected result. An example is the control program for PID control of steam temperature for a boiler. Sometimes, however, the controller requires extra memory for graphics, large look-up tables, additional functionality, or the like. If no more memory is directly addressable, then the rest must be shadowed.
Shadowing is typically done by setting some bits on a port or latch to control the upper address lines of a memory chip. The lower set of address lines remain tied to the address bus. The memory enable is designed to be selected only when the micro-processor address falls within a certain field. This field may be located any where in the available memory address map; however, break points using higher bit states typically dictate the field location in the map. The field width is defined by the number of actual lower memory chip address lines tied directly to the micro-processor address bus. The number of shadowed levels is determined by the number of high address bits that are set by a latch or port. To access different areas of the memory chip, the latched bits must be set to indicate which area is to be accessed.
If all of the memory is shadowed, then special software routines must be written to keep track of which shadow level the program is in and where to go next.
Another way to keep track is to use two or more separate memory chips and sort them into control memory chips and shadowed memory chips. In this way, basic shadowing methods can easily be applied.
The use of one chip, however, does not lend itself well to basic shadowing techniques. The reason for this is that upon power-up or during an interrupt in an industrial process controller, the program can go off track unless special care is taken to keep track of which level it is operating out of when all of the memory is shadowed.